//
//  CTMediator+ModuleAActions.m
//  New_Runway
//
//  Created by mack on 2018/1/27.
//  Copyright © 2018年 NelsonJ. All rights reserved.
//

#import "CTMediator+ModuleAActions.h"
NSString * const MediatorTargetA = @"A";//chance and login
NSString * const MediatorTargetB = @"B";//chance and login
NSString * const MediatorTargetC = @"C";//chance and login


@implementation CTMediator (ModuleAActions)


-(void)Router_viewControllerForCarset:(NSDictionary *)params callback:(void (^)(NSDictionary *))callback{
 
    [self addMethodWithNameParams:@{@"params":params,
                                     @"callback":callback
                                    } tag:0];
    
}
-(void)Router_viewControllerForDesk:(NSDictionary *)params callback:(void (^)(NSDictionary *))callback{
    [self addMethodWithNameParams:@{@"params":params,
                                    @"callback":callback
                                    } tag:1];
    
}

-(void)Router_viewControllerForMine:(NSDictionary *)params callback:(void (^)(NSDictionary *))callback{
    [self addMethodWithNameParams:@{@"params":params,
                                    @"callback":callback
                                    } tag:2];
    
}
- (void)addMethodWithNameParams:(NSDictionary *)params tag:(NSInteger)tag
{
    if (tag == 0) {
        [self performTarget:MediatorTargetA action:@"carset" params:params shouldCacheTarget:NO];

    }else if (tag == 1){
        [self performTarget:MediatorTargetB action:@"desk" params:params shouldCacheTarget:NO];

    }else if (tag == 2){
        [self performTarget:MediatorTargetC action:@"mine" params:params shouldCacheTarget:NO];

    }
}







@end
